package com.eva.learn.other;

/**
 * final关键字修饰对象，即对象引用不可变更，并且对象必须在加载时或构造方法内初始化
 * 
 * @author Evain.C
 *
 */
public class FinalTest {
	public static void main(String[] args) {
		FinalTest1 test1 = new FinalTest1("sss",2);
		System.out.println(test1.s);
		System.out.println();
	}
}

class FinalTest1 {
	final String s;
	final int i;

	public FinalTest1(String s,int i) {
		this.s = s;
		this.i=i;
	}
}
